<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="x-ua-compatible" content="ie=edge">
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" >
	<title>评价</title>
	<link rel="stylesheet" href="../vender/css/normalize.css">
	<link rel="stylesheet" href="cash.css">
	<link rel="stylesheet" href="../public/public_footer.css">

</head>
<body>
<header>
	<p>培训收入</p>
	<span class="detail">明细</span>
</header>
<section>
	<div class="left-money">
		<h3>我的余额(元)</h3>
		<span name="span"></span>
	</div>
	<!--<div class="income-details">
		<p>查看我最近的收入情况</p>
		<i></i>
	</div>-->
	<!--<div class="every-income">
		<ul>
			<li>
				<span>科二培训收入：</span>
				<span>￥<strong>340</strong></span>
			</li>
			<li>
				<span>科三培训收入：</span>
				<span>￥<strong>470</strong></span>
			</li>
			<li>
				<span>接送收入收入：</span>
				<span>￥<strong>340</strong></span>
			</li>
		</ul>
	</div>-->
	<div class="cash-sum">
		<ul>
			<li  id="cash">
				<span><i></i>提现</span>
				<i></i>
			</li>
			<!--<li>
				<span><i class="sum-2"></i>统计</span>
				<i></i>
			</li>-->
		</ul>
	</div>
</section>
<footer id="public_footer">
	<ul >
		<li class="order"  onclick="window.location.href='../order/oder.html'">
			<img src="../img/footer_list.png" alt="">
		</li>
		<li onclick="window.location.href='../plan/plan_1.html'">
			<img src="../img/footer_plan.png" alt="">
		</li>
		<li >
			<img src="../img/footer_cash_on.png" alt="">
		</li>
		<li  onclick="window.location.href='../coach-I/coach-me.html'">
			<img src="../img/footer_me.png" alt="">
		</li>
	</ul>
</footer>
<script src="../jquery.min.js"></script>
<script src="index.js"></script>
<script>
	$('.plan').click(function () {
		window.location.href='../plan/plan_1.html';
	});

	$(function () {

		var token=localStorage.phone;
		var money='';
		var wechat='';
		var alipay='';
		var teacher_id='';
		$.ajax({
			url:"https://newapp.icandrive.cn/api/cash_get_page.php",
			type:'post',
			data:{token:token},
			dataType:'json',
			success: function (data) {
				console.log(data.dataing);
				if(data.status==200){
					console.log(data);
					$(data.dataing).each(function () {
						$('span[name=span]').html(this.money);
						money=this.money;
						wechat=this.wechat_account;
						alipay=this.alipay_account;
						teacher_id=this.teacher_id;
					})
				}
			}

		});
		$('#cash').click(function () {

			 localStorage.money=money;
			localStorage.wechat=wechat;
			localStorage.alipay=alipay;
			window.location.href='../cashpage/cashpage.html';
		});
		$('.detail').click(function () {
			localStorage.teacher_id=teacher_id;
			window.location.href='../detail/detail.html';
		})
	})

</script>


    <script type="text/javascript">
        document.addEventListener("plusready", function() {
        // 注册返回按键事件
        plus.key.addEventListener('backbutton', function() {
        // 事件处理
        plus.nativeUI.confirm("退出程序？", function(event) {
        if (event.index) {
        plus.runtime.quit();
        }
        }, null, ["取消", "确定"]);
        }, false);
        });
</script>

</body>
</html>
